﻿using System;
using System.Collections.Generic;

namespace NetTopologySuite.Simplify
{
	public class TaggedLinesSimplifier
	{
		public double DistanceTolerance { get; set; }

		public void Simplify(ICollection<TaggedLineString> taggedLines)
		{
			foreach (TaggedLineString line in taggedLines)
			{
				this._inputIndex.Add(line);
			}
			foreach (TaggedLineString line2 in taggedLines)
			{
				new TaggedLineStringSimplifier(this._inputIndex, this._outputIndex)
				{
					DistanceTolerance = this.DistanceTolerance
				}.Simplify(line2);
			}
		}

		private readonly LineSegmentIndex _inputIndex = new LineSegmentIndex();

		private readonly LineSegmentIndex _outputIndex = new LineSegmentIndex();
	}
}
